<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/28 0028
  Time: 20:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<ul class="pagination pull-right no-margin">
    <c:if var="isFirst" test="${pm.pn <= 1}">
        <li class="prev disabled">
            <a href="javascript:;"><i class="ace-icon fa fa-angle-double-left"></i></a>
        </li>
    </c:if>
    <c:if test="${!isFirst}">
        <li class="prev">
            <c:if test="${state eq 'T'}">
                <a href="${basePath}catPost?method=index&pn=${pm.pn-1}">
                    <i class="ace-icon fa fa-angle-double-left"></i>
                </a>
            </c:if>
            <c:if test="${state eq 'F'}">
                <a href="${basePath}catPost?method=indexF&pn=${pm.pn-1}">
                    <i class="ace-icon fa fa-angle-double-left"></i>
                </a>
            </c:if>
        </li>
    </c:if>
    <c:forEach var="i" begin="1" end="${pm.pages}" step="1">
        <c:if var="isPn" test="${pm.pn==i}">
            <li class="active"><a href="javascript:;">${i}</a></li>
        </c:if>
        <c:if test="${!isPn}">
            <c:if test="${state eq 'T'}">
                <li><a href="${basePath}catPost?method=index&pn=${i}">${i}</a></li>
            </c:if>
            <c:if test="${state eq 'F'}">
                <li><a href="${basePath}catPost?method=indexF&pn=${i}">${i}</a></li>
            </c:if>
        </c:if>
    </c:forEach>
    <c:if var="isLast" test="${pm.pn >= pm.pages}">
        <li class="next disabled">
            <a href="javascript:;"><i class="ace-icon fa fa-angle-double-right"></i></a>
        </li>
    </c:if>
    <c:if test="${!isLast}">
        <c:if test="${ state eq 'T'}">
            <li class="next">
                <a href="${basePath}catPost?method=index&pn=${pm.pn+1}">
                    <i class="ace-icon fa fa-angle-double-right"></i>
                </a>
            </li>
        </c:if>
        <c:if test="${ state eq 'F'}">
            <li class="next">
                <a href="${basePath}catPost?method=indexF&pn=${pm.pn+1}">
                    <i class="ace-icon fa fa-angle-double-right"></i>
                </a>
            </li>
        </c:if>

    </c:if>
</ul>
